package com.ruoyi.logistic.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.NetworkMyAccount;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.vo.NetworkMyAccountVo;
import com.ruoyi.logistic.mapper.NetworkMyAccountMapper;
import com.ruoyi.logistic.service.NetworkMyAccountService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NetworkMyAccountServiceImpl implements NetworkMyAccountService {
    @Autowired
    private NetworkMyAccountMapper networkMyAccountMapper;
    @Override
    public List<NetworkMyAccount> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkMyAccountMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkMyAccount networkMyAccount) {
        return networkMyAccountMapper.insert(networkMyAccount);
    }

    @Override
    public Boolean update(NetworkMyAccount networkMyAccount) {
        return networkMyAccountMapper.update(networkMyAccount);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkMyAccountMapper.deleteById(id);
    }

    @Override
    public List<NetworkMyAccount> search(NetworkMyAccountVo networkMyAccountVo) {
        PageHelper.startPage(networkMyAccountVo.getPageDate());
        return networkMyAccountMapper.search(networkMyAccountVo);
    }
}
